import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  const a = ref(0)
  const obj = ref({ count: 0 })
  const doubleA = computed(() => a.value * 2)
  function increment() {
    a.value++
  }
  return { a, doubleA, increment, obj }
})
